<link rel="stylesheet" href="http://www.12301.cc/css/aliceui.min.css"/>
<link rel="stylesheet" href="http://www.12301.cc/css/resetui.css"/>
<link rel="stylesheet" href="http://www.12301.cc/css/product_publish.css?body=1"/>
<link rel="stylesheet" href="http://www.12301.cc/css/prod_store.css"/>
<link rel="stylesheet" href="http://www.12301.cc/css/my_color.css"/>
<link rel="stylesheet" href="http://www.12301.cc/css/easydialog.css"/>
    <div class="wrapper">
    <h3 class="mc_title">
        <span class="mctit_1"><span class="mctit_2">票类编辑</span></span>
    </h3>
    <?php if(!$isedit):?>
        <ol class="ui-ministep step3">
            <li class="ui-ministep-item">
                <span class="ui-ministep-text">产品类型</span>
            </li>
            <li class="ui-ministep-item">
                <span class="ui-ministep-text"><?=$FieldList[$ptype]['ticket']['t4']?></span>
            </li>
            <li class="ui-ministep-item ui-ministep-active">
                <span class="ui-ministep-text"><?=$FieldList[$ptype]['ticket']['t1']?></span>
            </li>
        </ol>
    <?endif;?>
    <form class="ui-form" name="branchForm" id="branchForm">
    <input type="hidden" name="did" value="<?=$apply_did?>">
    <input type="hidden" name="lastid" value="<?=$sid?>"/>
    <input type="hidden" name="action" value="CreateNewTicket"/>
    <input type="hidden" name="f[fid]" value="<?=$data_f['id']?>"/>
    <input type="hidden" name="step" value="2"/>
    <input type="hidden" name="ptype" value="<?=$ptype?>"/>
    <input type="hidden" name="chk_state" value="<?=$data['apply_limit']?>"/>
    <input type="hidden" name="pid" value="<?=$data['pid']?>"/>
    <input type="hidden" name="tid" value="<?=$data['id']?>"/>
    <input type="hidden" name="ser_date" value="<?=date('Ymd')?>"/>
    <input type="hidden" name="pft_rflex_id" value="<?=$data['pft_rflex_id']?>"/>
    <input type="hidden" name="iscopy" value="<?=$iscopy?>"/>
    <?=$saveByAdminInput?>
    <div class="ui-tipwrap" id="RefuseMsgWrapper">
        <div class="ui-tipbox ui-tipbox-error">
            <div class="ui-tipbox-content">
                <h3 class="ui-tipbox-title"></h3>
                <p class="ui-tipbox-explain" id="RefuseReason"></p>
            </div>
        </div>
    </div>
    <?
    if($ptype=='F') {
        $package_data = $scenryData['attribute'];
        $package_data = $obj->PackageDataFormat($package_data);
        include TPLPATH .'_package_box.html';
    }
    ?>
    <table id="pros_tbl" class="prod_laun">
        <caption>
            <h3>产品名：<?=$scenryData['title']?></h3>
        </caption>
        <thead>
        <tr class="header">
            <th colspan="2" class="th_n">常用属性</th>
        </tr>
        </thead>
        <tbody class="fixed_th_width">
    <tr>
        <th id="th_1">付款方式</th>
        <td data-hide="<?=$data['pay']?>">
            <label><input type="radio" class="vn_middle" value="1" <?=($data['pay']==1)?'checked="checked"':''?> name="payType" id="payType1" />在线支付</label>
			<input type="text" class="input-text w40 chknum" name="cancel_time" value="<?=$data['cancel_auto_onMin']?>">分钟未支付自动取消&nbsp;&nbsp;
            <label><input type="radio" class="vn_middle" value="0" <?=($data['pay']==0)?'checked="checked"':''?> name="payType" onChange="evolution_check(this,<?=$data['pid']?>)" />现场支付</label>
        </td>
    </tr>
    <tr>
        <th id="th_2">使用有效期</th>
        <? $utx = $ptype=='C'? '入住日期':'游玩日期'?>
        <td>
            <label><input data-delay="<?=$data['delaydays']?>" type="radio" name="validTime" <?=!$data['delaydays']?'checked="checked"':''?> value="0"/><?=$utx?>当天有效</label>&nbsp;&nbsp;
            <?if($ptype=='A' || $ptype=='C' || $data['delaydays']>0):?>
            <input type="radio" id="radio1" name="validTime" <?=$data['delaydays']>0?'checked="checked"':''?> value="<?=($data['delaytype']==0) ? 1:2;?>" /> 
				<select  id="btn1" >
                        <option value="1" <?if($data['delaytype']==0) echo 'selected="selected"'?>> 游玩日期(含)</option>
                        <option value="2" <?if($data['delaytype']==1) echo 'selected="selected"'?>> 下单日期</option>  
                </select>之后<input id="btn3" class="input-text w40 chknum" type="text" name="vt" value="<?=$data['delaydays']>0?$data['delaydays']:''?>">天内有效&nbsp;&nbsp;
            <?endif;?>
			<label>
			<input type="radio" id="radio2" name="validTime" data-ord="<?=$data['order_start']?>" <?if(strtotime($data['order_start'])>0 || strtotime($data['order_end'])>0) echo 'checked="checked"'?> value="3"/>开始日期<input type="text" data-t="bt" id="btn4" data-msg="请选择时间段" value="<?=substr($data['order_start'],0,10)?>"  name="order_start" class="required input-text w66"  onfocus="WdatePicker({minDate:'%y-%M-{%d}'})"/> 至
		<input type="text" data-t="bt" id="btn2" data-msg="请选择时间段" value="<?=substr($data['order_end'],0,10)?>"  name="order_end" class="required input-text w66"  onFocus="WdatePicker({minDate:'#F{$dp.$D(\'btn4\')}',maxDate:'2020-10-01'})"/>
		 <!-- onFocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})" -->
		有效</label>
        </td>
    </tr> 
    <tr>
        <th id="th_3">提前预定</th>
        <td>
            <span class="ui-form-explain">
                需提前<input type="text" class="input-text w40 chknum" name="earyTime" value="<?=isset($data['ddays'])?$data['ddays']:0?>">天，在
                <select name="f[dhour]">
                    <?for($i=23;$i>=0;$i--){?>
                        <option value="<?=$i?>" <?=isset($data_f['dhour']) && substr($data_f['dhour'],0,-4)==$i?'selected="selected"':''?>><?=$i.':59'?></option>
                    <?}?>
                </select>前预定
            </span>
        </td>
    </tr>
    
        <!--门票属性-->
        <tr>
            <th id="th_6"><span class="ui-form-required">*</span>取票信息</th>
            <td>
                <input type="text" id="ticket_val" value="<?=$data['getaddr']?>" title="请输入取票信息" name="TicketInfo" class="input-text w500" data-required="1">
                <span class="ui-form-explain">此信息将在游客手机短信上显示</span>
            </td>
        </tr>
	 <?php if($ptype=='A'):?>
        <tr>
            <th id="th_7">产品说明</th>
            <td>
                <textarea name="TicketExplain" class="input-text w500" style="height: 50px;"><?=$data['notes']?></textarea>
            </td>
        </tr>
        <!--门票属性-->
    <?php endif;?>
    <?php if($ptype=='B'):?>
        <!--线路属性-->
        <tr>
            <th>
                <span class="ui-form-required">*</span>游玩天数
            </th>
            <td>
                <input class="input-text w40 chknum" data-required="1" title="请输入游玩天数" type="text" name="f[rdays]" id="tourDays" value="<?=$data_f['rdays']?>">天
                <span class="ui-form-explain">请填写大于0的数字</span>
                <input class="input-text" name="f[beginPlace]" id="beginPlace"  type="hidden" placeholder="出发地" value="<?=$startplace?>">
                <input class="input-text" name="f[endPlace]" type="hidden" placeholder="目的地" value="<?=$endplace?>">
            </td>
        </tr>
        <tr>
            <th>团号</th>
            <td>
                <?
                $prefix = substr($data_f['series_model'],0, strpos($data_f['series_model'],'{'));
                $endfix = substr($data_f['series_model'],strpos($data_f['series_model'],'}')+2);
                ?>
                <input type="text" name="grp_num1" class="grp_num input-text w50" value="<?=$prefix?>"/>
                +出团日期+出团编号
                <select name="grp_num2" class="grp_num">
                    <option value="">选择</option>
                    <?for($i=1;$i<=10;$i++){ $code = str_pad($i, 2,'0',STR_PAD_LEFT);?>
                        <option value="<?=$code?>" <?=$endfix==$code?'selected="selected"':''?>><?=$code?></option>
                    <?}?>
                </select>
                预览：<span id="prev_grp_num"><?=!empty($data_f['series_model'])?str_replace('{fck_date}', date('Ymd'),$data_f['series_model']):''?></span>
            </td>
        </tr>
        <tr>
            <th><span class="ui-form-required">*</span>集合地点</th>
            <td>
                <textarea cols="100" rows="4" id="ass_station" name="f[ass_station]"><?=$ass?></textarea>
                <p class="ui-form-explain">填写集合地点、集合时间及导游手机，<span class="red">多个集合地点请用<strong>分号</strong>（;）分隔</span></p>
            </td>
        </tr>
        <!--线路属性-->
    <?endif;?>
    <tr>
        <th id="th_0"><span class="ui-form-required">*</span><?=$FieldList[$ptype]['ticket']['ticketType']?></th>
        <td>
            <input type="text" name="tTitle" class="input-text w300" data-required="1" title="请输入<?=$pname?>名称" value="<?=!empty($_GET['c_title'])?urldecode($_GET['c_title']):$data['title']?>">
			<?if($jiutian_bindFlag):?>
			<span class="ui-form-required">*</span>
			<span>关联线下票类</span>
			<select name="gate">
				<option value="" > 请选择 </option>
                <?foreach($jiuTians as $key=>$jiuTian):?>
                    <?if($data['uuid']==$jiuTian['uuid']):?>
                    <option value="<?=$jiuTian['uuid']?>" selected="selected"><?=$jiuTian['name']?></option>
                    <?else:?>
                    <option value="<?=$jiuTian['uuid']?>" ><?=$jiuTian['name']?></option>
                    <?endif?>
                <?endforeach;?>
			</select>
			<?endif?>

        </td>
    </tr>
    </tbody>
    </table>
    <table class="prod_laun" id="tab"> 
        <thead>
        <tr class="header">
            <th class="th_n">扩展属性</th>
            <td class="td_n"></td>
        </tr>
        </thead>
        <tbody class="fixed_th_width">
        <!-- <tr>
            <th>销售对象</th>
            <td>
               <?=GetHtmlSelect($ProvideTo,'provide_to',$data['p_status']);?>
            </td>
        </tr> -->
        <tr>
            <th>取消费用</th>
            <td>
				 <span class="number_style"><select id="testtt" onchange="check()" name="reb_type">
                    <option value="0">售价百分比</option>
                    <option value="1" <?if($data['reb_type']==1) echo 'selected="selected"'?>>固定金额</option></select>
                </span>
                <input type="text" name="reb" class="input-text w40 chknum" value="<?=($data['reb_type'])?  $data['reb']/100:$data['reb']?>"/>
                <span id="num_style">%</span>
                <span id="yuan_style">元</span>
               
                <span class="ui-form-explain">取消订单需要收取的费用百分比，填“0”代表不收取费用。</span>
            </td>
        </tr>
		
        <?if($access['yd']):?>
        <?
            if($data['cancel_cost']!=''):
                $cancel_cost = json_decode($data['cancel_cost'],true);
        ?>
        <?foreach($cancel_cost as $key=>$val):?>
        <tr id="x">
            <th>取消费用</th>
            <td>
                游玩日期前
                <input type="text" name="reb_days[]" class="input-text w40 chknum" value="<?=$key?>"/>
                天&nbsp;收取
                <input type="text" name="reb_cost[]" class="input-text w40 chknum" value="<?=$val?>"/>
                <span class="number_style">%</span>
                <span class="ui-form-explain">取消订单需要收取的费用百分比，填写“-1”代表所有日期</span>
				<span><input type="button" onclick="javascript:instTR()" value="添加"></span>
            </td>
        </tr>
        <?endforeach;?>
        <?else:?>
        <tr id="x">
            <th>取消费用</th>
            <td>
                游玩日期前
                <input type="text" name="reb_days[]" class="input-text w40 chknum" value=""/>
                天&nbsp;收取
                <input type="text" name="reb_cost[]" class="input-text w40 chknum" value=""/>
                <span class="number_style">%</span>
                <span class="ui-form-explain">取消订单需要收取的费用百分比，填写“-1”代表所有日期</span>
				<span><input type="button" onclick="javascript:instTR()" value="添加"></span>
            </td>
        </tr>
        <?endif;?>
        <?endif;?>
        <?php if($ptype=='A'):?>
        <tr>
            <th>验证时间</th>
            <td colspan="2" data-tl="<?=$data_f['v_time_limit']?>">
            <?php
            if($data_f['v_time_limit']) {
                $vt = explode('|', $data_f['v_time_limit']);
                $vtb = substr($vt[0], 0, strpos($vt[0],':'));
                $vte = substr($vt[1], 0, strpos($vt[1],':'));
                $span_v_time_limit = 'show';
            } else {
                $span_v_time_limit = 'hide';
            }
            ?>
            <label><input type="radio" value="0" name="v_time_limit" <?=$data_f['v_time_limit']==0 ? 'checked="checked" ':''?> />不限</label>
            <label><input type="radio" value="1" name="v_time_limit" <?=$data_f['v_time_limit']!=0 ? 'checked="checked" ':''?>/>自定义</label>
                    <span id="span_v_time_limit" style="display: <?=$span_v_time_limit?>;">
                        <select id="v_tl_1" name="vt1">
                             <?php for($i=0; $i<=23; $i++):?>
                            <option value="<?=$i . ':00'?>" <?=($i==$vtb? 'selected':'')?>><?=$i.':00'?></option>
                            <?php endfor;?>
                        </select>至
                        <select id="v_tl_2" name="vt2">
                            <?php for($i=0; $i<=23; $i++):?>
                            <option value="<?=$i . ':00'?>" <?=($i==$vte? 'selected':'')?>><?=$i.':00'?></option>
                            <?php endfor;?>
                        </select>
                    </span>
                <span class="ui-form-explain">限制日场票或夜场票的验票时间，间隔必须大于1小时</span>
            </td>
        </tr>
        <tr>
            <th>可验证日期</th>
            <td colspan="2">
                <?$order_limit = explode(',',$data['order_limit']);?>
                <label><input type="checkbox" <?if(!in_array(1,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="1">日</label>
                <label><input type="checkbox" <?if(!in_array(2,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="2">一</label>
                <label><input type="checkbox" <?if(!in_array(3,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="3">二</label>
                <label><input type="checkbox" <?if(!in_array(4,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="4">三</label>
                <label><input type="checkbox" <?if(!in_array(5,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="5">四</label>
                <label><input type="checkbox" <?if(!in_array(6,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="6">五</label>
                <label><input type="checkbox" <?if(!in_array(7,$order_limit))echo 'checked="checked"'?> name="verify_limit[]" class="pday" value="7">六</label>
            </td>
        </tr>
        <?php endif;?>
      <!--   <tr>
            <th>身份证验证</th>
            <td>
                <label><input type="radio" class="vn_middle" value="0" <?=!isset($data_f)||$data_f['v_ID_support']==0?'checked="checked"':''?> name="f[v_ID_support]" />不支持</label>
                <label><input type="radio" class="vn_middle" onclick="return confirm('您确定终端已经支持身份证验证了吗？')" value="1" <?=$data_f['v_ID_support']==1?'checked="checked"':''?> name="f[v_ID_support]" />支持</label>
                <span class="ui-form-explain">开启身份证验证需终端支持。</span>
            </td>
        </tr> -->
        <tr>
            <th>通知供应商</th>
            <td>
                <label><input type="radio" name="f[confirm_sms]" value="0" <?=!$data_f['confirm_sms']?'checked="checked"':''?>/>否</label>
                <?php
                    if(!isset($data)){
                        $dis_sms = 'disabled="disabled"';
                        $dis_sms_cl = 'disable';
                    }
                    if(isset($data_f['confirm_sms']) && $data_f['confirm_sms']==1){
                        $chk_sms = 'checked="checked"';
                    }
                ?>
                <label class="<?=$dis_sms_cl?>"><input type="radio" name="f[confirm_sms]" value="1" <?=$chk_sms?> <?=$dis_sms?>/>是</label>
                <span class="ui-form-explain">新订单是否短信通知供应商</span>
                通知手机： <input type="text" maxlength="11" id="notify_num" readonly="readonly" class="notify_num" value="<?=$notify_num?>"/>
                <a id="edit_notify_num" href="javascript:">编辑</a>
                <a id="cancel_edit_num" style="display: none;" href="javascript:">取消</a>
                <span id="edit_res"></span>
            </td>
        </tr>
        <tr>
            <th>发送凭证码</th>
            <td>
                <label><input type="radio" name="sendVoucher" value="0" checked="checked"/>是</label>
                <label><input type="radio" name="sendVoucher" value="1" <?if($data_f['sendVoucher']==1)echo 'checked="checked"';?>/>否</label>              
                <span class="ui-form-explain">是否发送短信（凭证码)到取票人手机</span>
            </td>
        </tr>
       <!--  <tr>
            <th>产品介质</th>
            <td>
                <label><input type="radio" class="vn_middle" value="0" <?=!isset($data)||$data['ifs']==0?'checked="checked"':''?> name="ticketMedia" />电子票</label>
                <label><input type="radio" class="vn_middle" value="1" <?=$data['ifs']==1?'checked="checked"':''?> name="ticketMedia" />实体票（需寄送）</label>
            </td>
        </tr> -->
        <tr>
            <th>游客信息</th>
            <td>
                <label><input type="radio" name="f[tourist_info]" <?=!$data_f['tourist_info']?'checked="checked"':''?> value="0"/>无需填写</label>
                <label><input type="radio" name="f[tourist_info]" <?=$data_f['tourist_info']==1?'checked="checked"':''?>value="1"/>只需填写一位游客信息</label>
                <label><input type="radio" name="f[tourist_info]" <?=$data_f['tourist_info']==2?'checked="checked"':''?>value="2"/>需填写所有游客信息</label>
                <span class="ui-form-explain">游客信息指游客姓名及身份证号</span>
            </td>
        </tr>
        <?if($access['yd']):?>
        <tr>
            <th>点评返积分</th>
            <td>
                返<input type="text" name="integral" class="input-text w40 chknum" style="height:16px;" value="<?=$data['re_integral']?>"/>积分
            </td>
        </tr>
        <?endif;?>
        <tr>
            <th>一次最少</th>
            <td>
                <input type="text" name="blimit_low" class="input-text w40 chknum" value="<?=isset($data) ? $data['buy_limit_low']:'1'?>"/>张
                <span class="ui-form-explain">一次最少购买的票数</span>
            </td>
        </tr>
        <tr>
            <th>一次最多</th>
            <td>
                <input type="text" name="blimit_up" class="input-text w40 chknum " value="<?=isset($data)?$data['buy_limit_up']:'0'?>"/>张
                <span class="ui-form-explain">一次最多购买的票数，填“0”代表不限</span>
            </td>
        </tr>
        <tr>
            <th>微信通知</th>
            <td>
                <label><input type="radio" name="confirm_wx" value="0" id='confirm_wx0' checked="checked"/>否</label>
                <label><input type="radio" name="confirm_wx" value="1" id='confirm_wx' <?if($data_f['confirm_wx']==1)echo 'checked="checked"';?>/>是</label>
                <span class="ui-form-explain">是否发送订单通知到微信</span>
                <a style='margin-left:10px' />请到手机端关注票付通官方微信
            </td>
        </tr>
        </tbody>
    </table>

    <table class="prod_laun" id="price_tb">
        <thead>
        <tr class="header">
            <th colspan="8">
                <span style="float:right;margin-right: 10px;margin-top: 2px; margin-top:0\9">
                    <button type="button" class="newprice ui-button ui-button-sorange">添加</button>
                </span>
                价格/库存配置[<a style="font-size: 12px;font-weight:normal;" target="_blank" href="storageConfig.html?pid=<?=$data['pid']?>">使用“日历模式”</a>]
                <?= $background ? '[<a style="font-size: 12px;font-weight:normal;" href="http://www.16u.cc/d/prod_invalid_price.html?pid='.$prod_id.'&token='.md5(date('Ymd').'cgp').'" target="_blank">历史记录</a>]':''?>
            </th>
        </tr>
        <tr class="bo_btn price_header">
            <th>序号</th>
            <th>销售时间段(同票类不能重复)</th>
            <th>销售适用日期</th>
            <th class="col4 price_helper" title="产品每天的库存，填“-1”表示不限">日库存</th>
            <th class="col4 price_helper" title="各级分销商最低结算价,单位“元”">供货价</th>
            <th class="col5 price_helper" title="产品限制的最低零售价格,单位“元”">零售价</th>
            <th>门市价</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="price_body">
            <?include(TPLPATH.'product_price.html');?>
        </tbody>
    </table>
        <div id="toAppend" class="btnWrap mt10">
            <?=$btnWrap?>
        </div>
    </form>
</div>
<div id="alter-box" class="alter-box">
    <p id="add_result" class="alter-result"><span class="ok"></span><span id="alter-msg" class="alter-msg"></span></p>
    <?php if(!$isedit):?>
        <p class="alter-ask">您是否要添加新门票？</p>
        <p>
            <button id="to_ticket_list" back-url="<?=$gourl?>" class="ui-button ui-button-mblue" type="button">返回列表</button>
            &nbsp;&nbsp;
            <button id="add_another_ticket" class="ui-button ui-button-mblue" type="button">继续添加</button>
        </p>
    <?php else:?>
        <p>
            <button id="to_ticket_list" back-url="<?=$gourl?>" class="ui-button ui-button-mblue" type="button">返回列表</button>
            &nbsp;&nbsp;
            <button id="close_dialog" onclick="easyDialog.close();" class="ui-button ui-button-mblue" type="button">关闭</button>
        </p>
    <?php endif;?>
</div>
<script type="text/template" id="sprice">
    <tr id="sprice_{k}">
        <th>{inc}</th>
        <td>
            从<input type="text" data-t="bt" data-msg="请选择时间段" name="ticket[{k}][bt]" readonly="readonly" class="required input-text w66" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
            至<input type="text" data-t="et" data-msg="请选择时间段" name="ticket[{k}][et]" readonly="readonly" class="required input-text w66" onfocus="SelectDate(this,'yyyy-MM-dd',0,0)"/>
        </td>
        <td>
            <a href="javascript:" class="date_chk" data-chk="1">全选</a>&nbsp;
            <a href="javascript:" class="date_chk" data-chk="2">平时</a>&nbsp;
            <a href="javascript:" class="date_chk" data-chk="3">周末</a>
            <br/>
            <label><input type="checkbox" name="ticket[{k}][normalDay][0]" checked="checked" class="pday" value="0">日</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][1]" checked="checked" class="pday" value="1">一</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][2]" checked="checked" class="pday" value="2">二</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][3]" checked="checked" class="pday" value="3">三</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][4]" checked="checked" class="pday" value="4">四</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][5]" checked="checked" class="pday" value="5">五</label>
            <label><input type="checkbox" name="ticket[{k}][normalDay][6]" checked="checked" class="pday" value="6">六</label>
        </td>
        <td>
            <input type="text" data-t="pp" title="请输入日库存量“-1”不限" value="不限" class="input-text w40 storage" name="ticket[{k}][storage]">
        </td>
        <td>
           <input type="text" data-t="pp" data-msg="请输入供货价"  class="required input-text w40" name="ticket[{k}][pg]">
        </td>
        <td>
           <input type="text" data-t="sp" data-msg="请输入零售价" class="required input-text w40" name="ticket[{k}][pl]">
        </td>
        <td>
            &nbsp;
        </td>
        <td><a href="javascript:"  data-rid="{k}" class="remvPrice">删除</a></td>
    </tr>
</script>
<script type="text/javascript">
 
function instTR(){
   var tab=document.getElementById('tab');
   var n=document.getElementById('x').rowIndex+1;
   var tr=tab.insertRow(n);
   var td=tr.insertCell(0);
   var th=tr.insertCell(0);
   th.innerHTML="<div class=\"th_th\"><th>取消费用</th></div>";
   td.innerHTML="<td>游玩日期前 <input type='text' name='reb_days[]' class='input-text w40 chknum' value='<?=$val['days']?>'/> 天&nbsp;收取  <input type='text' name='reb_cost[]' class='input-text w40 chknum' value='<?=$val['cost']?>'/><span class='number_style'></span><span class='number_style'>&nbsp;&nbsp;%  </span><span class='ui-form-explain'>取消订单需要收取的费用百分比，填写“-1”代表所有日期</span><a href=\"javascript:\" class=\"del\" >删除</a></td>";
    $(".del").live('click',function(){
        $(this).parents("tr").remove();
    });          
}

function check(){
    var r=document.getElementById("testtt").value;
    if (r=='0'){
        document.getElementById("num_style").style.color="#000000";
        document.getElementById("yuan_style").style.color="#ffffff";
    }else{
        document.getElementById("yuan_style").style.color="#000000";
        document.getElementById("num_style").style.color="#ffffff";
    }
}
window.onload = function(){
    check();
	var rr=document.getElementById("ticket_val").value;
		 if(rr==""){
		   document.getElementById("ticket_val").value="取票信息:"
		}
	
}


   
  
</script>
<script src="http://www.12301.cc/js/easydialog.min.js" type="text/javascript"></script>
<script src="http://www.12301.cc/js/ticket_edit.add.js" type="text/javascript"></script>
<script src="http://www.12301.cc/js/prod_pub.js" type="text/javascript"></script>
<script src="http://www.12301.cc/js/WdatePicker.js"></script>
<?
$src="http://www.12301.cc/js/prod_editk_v3.js?20140903";
if($_GET['sync'] && $_GET['sync']=='225800'){
    $src="http://www.12301.cc/js/prod_editk_sync.js?20140903";
}
?>
<script src="<?=$src?>" type="text/javascript"></script>
<script src="http://www.12301.cc/js/Calendar.js" type="text/javascript"></script>
